import com.mobile.java_spring_boot.JavaSpringBootApplication;
import com.mobile.java_spring_boot.entity.Student;
import com.mobile.java_spring_boot.mapper.StudentMapper;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;


import javax.annotation.Resource;
import java.util.List;


@SpringBootTest(classes = JavaSpringBootApplication.class)
public class JavaSpringBootApplicationTest {
    @Resource
    StudentMapper studentMapper;

    @Test
    void testStudentMapper() {
        Student student = new Student(0,"老周",20,"男","13445556666","武汉");
        studentMapper.insertStudent(student);
        List<Student> students = studentMapper.selectStudents();
        students.forEach(System.out::println);
    }

}